#ifndef VECTOR_H
#define VECTOR_H
#define doubleResolution 0.000000000001
class Vector{
	public:
		Vector();
        Vector(const Vector& other);
		Vector(double initX, double initY, double initZ, double initHomogenous):
			x(initX),y(initY),z(initZ),homogenous(initHomogenous){};
		double& operator[](int index);
		Vector operator+(const Vector& v2){
			return Vector(this->x + v2.x, this->y + v2.y, this->z + v2.z, this->homogenous + v2.homogenous);
		};
		Vector operator-(const Vector& v2){
			return Vector(this->x - v2.x, this->y - v2.y, this->z - v2.z, this->homogenous - v2.homogenous);
		};
		double magnitude();
		double dotProduct(const Vector& v2);
		Vector cross(const Vector& v2);
		Vector operator*(double t){
			return Vector(this->x * t, this->y * t, this->z * t, this->homogenous);
		}
		void normalize();
	private:
		double x;
		double y;
		double z;
		double homogenous;
};
#endif

